<?php

echo '<pre>';

$fruits = array("d" => "lemon", "a" => array("orange", 'orange2'), "b" => "banana", "c" => "apple");

echo '----------------------<br/>';
var_dump($fruits);

function func(&$value, $key, $data)
{
	$value = $data . ':' . $key . '/' . $value;
}
array_walk_recursive($fruits, 'func', 'sss');

echo '<br/>-----------------------<br/>';
var_dump($fruits);